export default {
    notify(msg, duration = 1) {
        let e = document.createElement('div')
        let s = {
            background: '#fff',
            minHeight: '50px',
            position: 'absolute',
            width: '200px',
            textAlign: 'center',
            margin: 'auto',
            top: '20px',
            left: '0',
            right: '0',
            lineHeight: '50px',
            fontSize: '18px',
            borderRadius: '5px',
            border: 'solid 1px #ff0'
        };
        Object.assign(e.style, s)
        e.innerHTML = msg
        document.body.appendChild(e)
        setTimeout(() => {
            document.body.removeChild(e)
        }, duration * 1000)
    },

    loadding(vm) {
        vm.$loading()
    }
}